package br.edu.unibratec.Projeto.controller;

import java.util.List;

import android.content.Context;
import android.graphics.Color;
import android.text.format.DateFormat;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class ParadaAdpater extends BaseAdapter{

	private List<Parada> paradas;
	private Context contexto;
	
	public ParadaAdpater(List<Parada> paradas, Context contexto) {
		super();
		this.paradas = paradas;
		this.contexto = contexto;
	}

	@Override
	public int getCount() {
		return paradas.size();
	}

	@Override
	public Object getItem(int position) {
		return paradas.get(position);
	}

	@Override
	public long getItemId(int position) {
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		Parada parada = (Parada) this.getItem(position);

		TextView txtview = new TextView(this.contexto);
		txtview.setTextSize(25);
		txtview.setText(parada.getNome() + " \n " + parada.getDescricao() );
		return txtview;
	}
}
